package String;

public class ReverseLeftWords58 {
    public static void main(String[] args) {
        System.out.println(reverseLeftWords("lrloseumgh", 6));
    }
    public static String reverseLeftWords(String s, int n) {
        if(s == null || n == 0){
            return s;
        }
        char[] chars = s.toCharArray();
        char[] newChars = new char[chars.length];
        for (int i = 0; i < chars.length; i++) {
            newChars[(i+(chars.length - n))%chars.length] = chars[i];
        }
        return new String(newChars);
    }
}
